package com.changgou.user.feign;

import com.changgou.entity.Result;
import com.changgou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = "user")
@RequestMapping("/user")
@CrossOrigin
public interface UserFeign {

    @GetMapping("/{id}")
     Result<User> findById(@PathVariable("id") String id);

    /**
     * 增加积分
     * @param points
     * @return
     */
    @GetMapping("/points/{points}")
    public Result points(@PathVariable(value = "points") Integer points);
}
